def print99row():
    for i in range(1,10):  #row
        x=""
        for j in range(i,10): #col
            x+=f'{i}*{j}='+str(i*j).rjust(2,' ') +'\t'
        print(x)


def print99col():
    for i in range(1,10):  #row
        x=""
        for j in range(1,10): #col
            if i==j:
                x+=f'{j}*{i}='+str(i*j).rjust(2,' ')
            elif i>j:
                x+=f'{j}*{i}='+str(i*j).rjust(2,' ')+'\t'
            else:
                pass
        print(x)


print99row()
print()
print99col()

